/* 导入动画样式 */
@import './animations.css';

:root {
  --background: #ffffff;
  --foreground: #171717;
  --primary: #3b82f6;
  --primary-foreground: #ffffff;
  --secondary: #f3f4f6;
  --secondary-foreground: #1f2937;
  --accent: #f59e0b;
  --accent-foreground: #ffffff;
  --muted: #f3f4f6;
  --muted-foreground: #6b7280;
  --card: #ffffff;
  --card-foreground: #171717;
  --border: #e5e7eb;
  --input: #e5e7eb;
  --ring: #3b82f6;
  --radius: 0.5rem;
  --header-height: 56px;
  --footer-height: 56px;
  --max-width: 640px;
  
  /* 动画持续时间变量 */
  --animation-fast: 0.2s;
  --animation-normal: 0.3s;
  --animation-slow: 0.5s;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
    --primary: #3b82f6;
    --primary-foreground: #ffffff;
    --secondary: #1f2937;
    --secondary-foreground: #f3f4f6;
    --accent: #f59e0b;
    --accent-foreground: #ffffff;
    --muted: #1f2937;
    --muted-foreground: #9ca3af;
    --card: #171717;
    --card-foreground: #ededed;
    --border: #374151;
    --input: #374151;
    --ring: #3b82f6;
  }
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  height: 100%;
}

body {
  color: var(--foreground);
  background: var(--background);
  font-family: var(--font-geist-sans), Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* 移动端滚动优化 */
.scroll-container {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 防止iOS点击闪烁 */
a, button, input, textarea {
  -webkit-tap-highlight-color: transparent;
}

/* 移动端安全区域适配 */
.safe-area-inset-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

.safe-area-inset-top {
  padding-top: env(safe-area-inset-top);
}

/* 移动端1px边框问题 */
.hairline-bottom {
  position: relative;
}

.hairline-bottom::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: var(--border);
  transform: scaleY(0.5);
  transform-origin: bottom;
}

/* 移动端容器 */
.mobile-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}
